﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace B.S.Traceability.Myproject.infrastructure.Migrations
{
    public partial class cxv : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "AquacultureInformation",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    variety = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    source = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Number = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    brand = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HealthCareMethodType = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    HealthCareMethod = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    FeedingPersonInCharge = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    SlaughterDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    Farm = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    PersonInCharge = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_AquacultureInformation", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "EnterpriseInfo",
                columns: table => new
                {
                    EnterpriseInfoId = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    FarmName = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Slaughterhouse = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProcessingPlant = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ResponsiblePerson = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    LivestockCount = table.Column<int>(type: "int", nullable: false),
                    Province = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    City = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    County = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    EstablishDate = table.Column<DateTime>(type: "datetime2", nullable: false),
                    CompanyProfile = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Batch = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_EnterpriseInfo", x => x.EnterpriseInfoId);
                });

            migrationBuilder.CreateTable(
                name: "Imagess",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ImagessName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ImagessType = table.Column<string>(type: "nvarchar(max)", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Imagess", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Information",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ShopName = table.Column<int>(type: "int", nullable: false),
                    batch = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ShelfLife = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    ProductionLicense = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Manufacturers = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    image = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    completeness = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Isdel = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Information", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "ShopMondel",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    ShopName = table.Column<string>(type: "nvarchar(max)", nullable: false),
                    Status = table.Column<int>(type: "int", nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_ShopMondel", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Slaughter",
                columns: table => new
                {
                    Id = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    batch = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    weight = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    CreateTTime = table.Column<DateTime>(type: "datetime2", nullable: true),
                    slaughterTime = table.Column<DateTime>(type: "datetime2", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Slaughter", x => x.Id);
                });

            migrationBuilder.CreateTable(
                name: "Vendor",
                columns: table => new
                {
                    ID = table.Column<int>(type: "int", nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    Team = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Head = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    ProductionBatches = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    RawMaterial = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Accessories = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    Additive = table.Column<string>(type: "nvarchar(max)", nullable: true),
                    PackagingMaterials = table.Column<string>(type: "nvarchar(max)", nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_Vendor", x => x.ID);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "AquacultureInformation");

            migrationBuilder.DropTable(
                name: "EnterpriseInfo");

            migrationBuilder.DropTable(
                name: "Imagess");

            migrationBuilder.DropTable(
                name: "Information");

            migrationBuilder.DropTable(
                name: "ShopMondel");

            migrationBuilder.DropTable(
                name: "Slaughter");

            migrationBuilder.DropTable(
                name: "Vendor");
        }
    }
}
